package com.yinhai.message.web.po;

import com.yinhai.core.service.ta3.domain.po.BasePo;
import com.yinhai.message.api.bean.TMUser;
import com.yinhai.message.core.util.IMessageConstant;

/**
 * @author xiepx 2017.3.28 联系信息实体po
 */
public class UserContactPo extends BasePo {

    private Long userid;
    private String tel;
    private String email;
    private String wechat;
    private String phoneapp;
    private String imid;

    public UserContactPo() {
    }

    public UserContactPo(Long userid, String tel, String email, String wechat, String phoneapp, String imid) {
        this.userid = userid;
        this.tel = tel;
        this.email = email;
        this.wechat = wechat;
        this.phoneapp = phoneapp;
        this.imid = imid;
    }

    public Long getUserid() {
        return userid;
    }

    public void setUserid(Long userid) {
        this.userid = userid;
    }

    public String getTel() {
        return tel;
    }

    public void setTel(String tel) {
        this.tel = tel;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getWechat() {
        return wechat;
    }

    public void setWechat(String wechat) {
        this.wechat = wechat;
    }

    public String getPhoneapp() {
        return phoneapp;
    }

    public void setPhoneapp(String phoneapp) {
        this.phoneapp = phoneapp;
    }

    public String getImid() {
        return imid;
    }

    public void setImid(String imid) {
        this.imid = imid;
    }

    public TMUser toTMUser() {
        TMUser user = new TMUser();
        user.setWeChat(this.wechat);
        user.setSms(this.tel);
        user.setImId(this.imid);
        user.setUserId("" + this.userid);
        user.setEmail("" + this.email);
        user.setRegistrationId("" + this.phoneapp);
        user.setSendSign(IMessageConstant.MSG_STATE_SEND_ALREADY);
        return user;
    }
}
